<br />
<?php
foreach($query->result() as $res):
?>
<a href="<?php echo base_url()?>sas/play/<?php echo $res->id_subject?>">
<table width="120" height="170" border="0" cellspacing="0" cellpadding="0" class="table-box bg-trans">
  <tr>
    <td>
    <div align="center"><?php echo $res->name?></div>
    </td>
  </tr>
</table>
</a>
<?php endforeach;?>
